/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.nms.entities;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author mohamedemara
 */
@Entity
@Table(name = "CUSTOMERS")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Customers.findAll", query = "SELECT c FROM Customers c"),
    @NamedQuery(name = "Customers.findByCustomerId", query = "SELECT c FROM Customers c WHERE c.customerId = :customerId"),
    @NamedQuery(name = "Customers.findByCustomerName", query = "SELECT c FROM Customers c WHERE c.customerName = :customerName"),
    @NamedQuery(name = "Customers.findByCustomerTele", query = "SELECT c FROM Customers c WHERE c.customerTele = :customerTele"),
    @NamedQuery(name = "Customers.findByCustomerContactTele", query = "SELECT c FROM Customers c WHERE c.customerContactTele = :customerContactTele"),
    @NamedQuery(name = "Customers.findByCustomerContactDate", query = "SELECT c FROM Customers c WHERE c.customerContactDate = :customerContactDate"),
    @NamedQuery(name = "Customers.findByCustomerCentral", query = "SELECT c FROM Customers c WHERE c.customerCentral = :customerCentral"),
    @NamedQuery(name = "Customers.findByCustomerComeby", query = "SELECT c FROM Customers c WHERE c.customerComeby = :customerComeby")})
public class Customers implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 10)
    @Column(name = "customer_id")
    private String customerId;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 30)
    @Column(name = "customer_name")
    private String customerName;
    @Size(max = 15)
    @Column(name = "customer_tele")
    private String customerTele;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 15)
    @Column(name = "customer_contact_tele")
    private String customerContactTele;
    @Basic(optional = false)
    @NotNull
    @Column(name = "customer_contact_date")
    @Temporal(TemporalType.TIMESTAMP)
    private Date customerContactDate;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 15)
    @Column(name = "customer_central")
    private String customerCentral;
    @Size(max = 10)
    @Column(name = "customer_comeby")
    private String customerComeby;

    public Customers() {
    }

    public Customers(String customerId) {
        this.customerId = customerId;
    }

    public Customers(String customerId, String customerName, String customerContactTele, Date customerContactDate, String customerCentral) {
        this.customerId = customerId;
        this.customerName = customerName;
        this.customerContactTele = customerContactTele;
        this.customerContactDate = customerContactDate;
        this.customerCentral = customerCentral;
    }

    public String getCustomerId() {
        return customerId;
    }

    public void setCustomerId(String customerId) {
        this.customerId = customerId;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public String getCustomerTele() {
        return customerTele;
    }

    public void setCustomerTele(String customerTele) {
        this.customerTele = customerTele;
    }

    public String getCustomerContactTele() {
        return customerContactTele;
    }

    public void setCustomerContactTele(String customerContactTele) {
        this.customerContactTele = customerContactTele;
    }

    public Date getCustomerContactDate() {
        return customerContactDate;
    }

    public void setCustomerContactDate(Date customerContactDate) {
        this.customerContactDate = customerContactDate;
    }

    public String getCustomerCentral() {
        return customerCentral;
    }

    public void setCustomerCentral(String customerCentral) {
        this.customerCentral = customerCentral;
    }

    public String getCustomerComeby() {
        return customerComeby;
    }

    public void setCustomerComeby(String customerComeby) {
        this.customerComeby = customerComeby;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (customerId != null ? customerId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Customers)) {
            return false;
        }
        Customers other = (Customers) object;
        if ((this.customerId == null && other.customerId != null) || (this.customerId != null && !this.customerId.equals(other.customerId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.nms.entities.Customers[ customerId=" + customerId + " ]";
    }
    
}
